<?php
    require_once "config.php";
    $serv = new swoole_server(HOST,9502,SWOOLE_PROCESS,SWOOLE_SOCK_UDP);

    $serv->on(PACKET_EVENT,function($serv,$data,$fd){
        $serv->sendto($fd['address'],$fd['port'],"Server:From - {$fd['address']};Port-{$fd['port']} ".$data."\n");
        var_dump($fd);
    });
    $serv->start();